//引入请求库
import http from '@/utils/http2.js';
/**
 * 查询客户
 * @param {*} data
 * @returns
 */
export function queryCustomer(data) {
  return http.post("/api/customer/list", data);
}

/**
 * 保存客户
 * @param data
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function saveCustomer(data){
  return http.post("/api/customer",data);
}

/**
 * 查客户详情
 * @param id
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function getDetail(id){
  return http.get("/api/customer",{ id });
}
//修改
export function update(data){
  return http.put("/api/customer",data);
}
